package cn.tedu.shopol.taojin.controller;


import cn.tedu.shopol.taojin.model.ProducthomeParticular;
import cn.tedu.shopol.taojin.service.IProducthomeParticularService;
import cn.tedu.shopol.taojin.util.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tedu.cn
 * @since 2020-12-08
 */
@RestController
@RequestMapping("/taojin/producthomeParticular")
@Slf4j
public class ProducthomeParticularController {

    @Autowired
    IProducthomeParticularService particularService;

    @GetMapping("/max")
    public R<List<ProducthomeParticular>> getMax(){

        return R.ok().setData(particularService.findByProductCountMax());
    }

    @GetMapping("/min")
    public R<List<ProducthomeParticular>> getMin(){

        return R.ok().setData(particularService.findByProductCountMin());
    }

}
